package com.woshua.behaviormodel;

import android.support.annotation.Nullable;
import android.view.ViewGroup;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by Android Studio.
 * User: 赵宏图
 * Date: 2019/8/14
 * Time: 9:03
 * Email:zhaohongtu@payworth.cn
 * Desc:
 */
public class StringAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public StringAdapter(@Nullable List<String> data) {
        super(data);
    }

    @Override
    protected BaseViewHolder onCreateDefViewHolder(ViewGroup parent, int viewType) {
        TextView textView=new TextView(parent.getContext());
        textView.setTextSize(36);
        return new BaseViewHolder(textView);
    }

    @Override
    protected void convert(BaseViewHolder holder, String item) {
        ((TextView) holder.itemView).setText(item);
    }
}
